package com.jash.labor.mapper.provider;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class SqlLaborProvider {

    public String laborQueryCheck(Page page, Integer id){

        String sql = "select l.name,referral_fee,s.createtime,s.is_cash "+
                "from labor l,station,station_check_in s "+
                "where s.referee_id = "+id+" and s.labor_id = l.id "+
                "and station.id = s.station_id ";

        return sql;
    }

    public String laborQueryCheckIs(Page page,Integer id){
        String sql = "select l.name,l.sex,l.mobile,l.age,referral_fee,s.createtime "+
                "from labor l,station,station_check_in s "+
                "where s.referee_id = "+id+" and s.labor_id = l.id "+
                "and station.id = s.station_id ";
        return sql;
    }
    public String laborQueryEnroll(Page page,Integer id){

        String sql = "select l.name,l.sex,l.mobile,l.age,referral_fee "+
                "from labor l,station,station_enroll se "+
                "where se.referee_id = "+id+" and se.labor_id = l.id "+
                "and station.id = se.station_id ";
        return sql;
    }
}
